<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>添加医生信息/修改医生信息</title>
</head>
<body>

	<form name="doctorForm" action="/admin/doctor/save" method="post" enctype="multipart/form-data" >
		<fieldset>
			<legend>医生信息</legend>
			<input type="hidden" name="id" value="" />
			<h5>说明：录入医生信息成功后，系统自动生成该医生登录的账号和密码，账号和初始密码均为姓名的全拼</h5>
			<table border="0" cellpadding="2" cellspacing="1" style="width: 90%">

				<tr>
					<td align="right" width="30%">姓名:</td>
					<td width="70%">
						<input name="doctor.name" type="text" class="text" size="15" value="${(doctor.name)!}"/>
						<#if nameMsg??><label style="color:red">${nameMsg}</label></#if>
					</td>
				</tr>
				<tr>
					<td align="right">
						职称:
					</td>
					<td>
						<select name="doctor.roleId" >
							<option value="-1">请选择职位</option>
							<#list roles as role>
								<option value="${role.id}" <#if (doctor.roleId)?? && doctor.roleId == role.id >selected="selected"</#if> >${role.name}</option>
							</#list>
						</select>
						<#if roleMsg??><label style="color:red">${roleMsg}</label></#if>
					</td>
				</tr>

				<tr>
					<td align="right">科室:</td>
					<td>
						<select name="doctor.departmentId" >
							<option value="-1">请选择科室</option>
							<#list departments as department>
								<option value="${department.id}" <#if (doctor.departmentId)?? && doctor.departmentId == department.id >selected="selected"</#if> >${department.name}</option>
							</#list>
						</select>
						<#if departmentMsg??><label style="color:red">${departmentMsg}</label></#if>
					</td>
				</tr>
				<tr>
					<td align="right">性别:</td>
					<td>
					
					<#if (doctor.sex)?? && doctor.sex == 0 >
						<input type="radio" name="doctor.sex"  value="1" />
							男
						<input type="radio" name="doctor.sex" checked="checked" value="0" />
							女
					<#else>
						<input type="radio" name="doctor.sex" checked="checked" value="1" />
							男
						<input type="radio" name="doctor.sex"  value="0" />
							女	
					</#if>
					
					</td>
				</tr>
				<tr>
					<td align="right">年龄:</td>
					<td>
						<input name="doctor.age" type="text" value="${(doctor.age)!}"/>
						<#if ageMsg??><label style="color:red">${ageMsg}</label></#if>
					</td>
				</tr>

				<tr>
					<td align="right">上传头像:</td>
					<td>
						<input name="doctor.image" type="file" />
						<#if imageMsg??><label style="color:red">${imageMsg}</label></#if>
					</td>
				</tr>

				<tr>
					<td align="right">医生简介:</td>
					<td>
						<textarea name="doctor.desc" rows="10" cols="50" >${(doctor.desc)!}</textarea>
					</td>
				</tr>

			</table>
			<input type="hidden" value="${(doctor.id)!}" name="doctor.id"/>
			<input type="submit" value="保存" />
			<br />
		</fieldset>

	</form>

</body>
</html>